package com.pet.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.pet.mapper.UserMapper;
import com.pet.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MessageServiceImpl implements MessageService{
    @Autowired
    private UserMapper userMapper;
    @Override
    public User getUserByName(String userName) {
        QueryWrapper<User> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("username", userName);
        User user = userMapper.selectOne(queryWrapper);
        return user;
    }
}
